home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
151-175
/
scopedisk168
/
asmmacros
/
am_02
/
findtask.i
< prev
next >
Wrap
Text File
|
1995-03-19
|
2KB
|
73 lines
NOLIST
FindTask MACRO ; 19 Dec 88
*------------------------------; Start of FindTask macro.
NOLIST
IFC '\1','I' ; If <PointerToTaskName> is specified, then
LIST
; Put <PointerToTaskName> in A1.
MOVEA.L #\2,A1
NOLIST
IFEQ ReEntrant-1
LIST
ADDA.L A5,A1
NOLIST
ENDC
ENDC
IFC '\1','D' ; If <TaskName> is specified, then
LIST
; Make A1 point to the task name string.
MOVEA.L #\2.str,A1
NOLIST
IFND \2.str ; Unless it was previously defined,
LIST
SECTION DataSection,DATA ; The ASCII <TaskName> string goes here.
\2.str:
DC.B '\2',0
CNOP 0,2
SECTION CodeSection,CODE
NOLIST
ENDC
ENDC
IFC '\1','Self' ; If "Self" is specified, then
LIST
SUBA.L A1,A1 ; Clear A1 to indicate "Self".
NOLIST
ENDC
LIST
CallLib FindTask,exec ; Call FindTask.
; Put the pointer to the task structure at
; <TaskStructPtrName>.
NOLIST
IFC '\1','Self'
IFEQ ReEntrant-1
LIST
DefDS \2,1
MOVE.L D0,\2(A5)
NOLIST
ENDC
IFNE ReEntrant-1
LIST
DS_BSS \2,1,.L
MOVE.L D0,\2
NOLIST
ENDC
ENDC
IFNC '\1','Self'
IFEQ ReEntrant-1
LIST
DefDS \3,1
MOVE.L D0,\3(A5)
NOLIST
ENDC
IFNE ReEntrant-1
LIST
DS_BSS \3,1,.L
MOVE.L D0,\3
NOLIST
ENDC
ENDC
LIST
*------------------------------; End of FindTask macro.
ENDM
LIST